package com.atguigu.gulimall.search.vo;

import com.atguigu.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.List;

/**
 * @author houChen
 * @date 2021/11/14 9:30
 * @Description:   搜索返回结果类
 */
@Data
public class SearchResult {

    //从es中查询到的所有商品信息
    private List<SkuEsModel> products;
    private Integer pageNum;
    private Long total;
    private Integer totalPages;  //总页码
    private List<Integer> pageNavs;

    private List<BrandVo> brands; //当前查询的结果所有涉及到的品牌
    private List<CatalogVo> catalogs;
    private List<AttrVo> attrs;

    @Data
    public static class BrandVo{
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class CatalogVo{
        private Long catalogId;
        private String catalogName;
    }

    @Data
    public static class AttrVo{
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }
}